#ifndef _MISSION_H_
#define _MISSION_H_

#include "stdint.h"
#include "types.h"

#define BEEP_ON PCout(9)=1;
#define BEEP_OFF PCout(9)=0;

typedef struct {
	unsigned char mission; // 当前任务编号，最多到 5
	unsigned char aux_flag; // 辅助编号
	int aux_last; // 辅助编号，但是似乎要手动更新
	unsigned char mission_step; // 当前任务步骤，最多到 4
	unsigned char mission_step2; // 当前任务子步骤
	unsigned char mission_flag; // 任务标志位
	uint32_t time_ms_pre; // 运行时长，需要手动更新
} play;

extern att_t att;
extern flags_struct_t f;
extern play play_mission;
extern volatile uint8_t openmv_enable;
extern volatile uint8_t openmv_flag;
extern volatile int16_t initialThrottleHold;
extern int16_t OPTIC_ISUM[2];

extern void mission_control();

extern void mission_check();

#endif
